<script>
export default {
    data() {
        return {

        };
    },
    methods: {
        demandStatusMessage(abutment) {
            var service_status = abutment.service_status;
            var demand_status = abutment.demand_status;
            // 两方都未操作
            if(service_status == 0 && demand_status == 0) return ["无效状态", "000000", 0, 0];
            // 一方投递
            else if(service_status == 0 && demand_status == 1) return ["等待对方接受投递", "000000", 0, 0];
            else if(service_status == 1 && demand_status == 0) return ["对方发起的约谈", "110000", 0, 0];
            // 两方约谈中
            //else if(service_status == 1 && demand_status == 1) return ["约谈中", "001100", 1, 0];
            // 一方同意合作
            //else if(service_status == 1 && demand_status == 2) return ["等待对方同意合作", "000100", 1, 0];
            //else if(service_status == 2 && demand_status == 1) return ["对方已同意合作", "001100", 1, 0];
            // 两方同意合作，合作进行中
            else if(service_status == 2 && demand_status == 2) return ["合作中", "000001", 1, 0];
            // 一方同意完成合作
            else if(service_status == 2 && demand_status == 3) return ["等待对方确认结束", "000001", 1, 0];
            else if(service_status == 3 && demand_status == 2) return ["对方已确认结束", "000011", 1, 0];
            // 两方都同意完成合作
            else if(service_status == 3 && demand_status == 3) return ["已成功结束", "000000", 2, 0];
            // 任何情况下的取消对接
            else if(demand_status == 0 && service_status == 4) return ["对方已取消", "000000", 0, 1];
            else if(demand_status == 1 && service_status == 4) return ["对方已拒绝", "000000", 0, 2];
            else if(demand_status == 2 && service_status == 4) return ["对方已取消", "000000", 2, 1];
            else if(demand_status == 3 && service_status == 4) return ["对方已取消", "000000", 1, 1];
            else if(demand_status == 4 && service_status == 0) return ["我方已取消", "000000", 0, 1];
            else if(demand_status == 4 && service_status == 1) return ["我方已拒绝", "000000", 0, 2];
            else if(demand_status == 4 && service_status == 2) return ["我方已取消", "000000", 2, 1];
            else if(demand_status == 4 && service_status == 3) return ["我方已取消", "000000", 1, 1];
            else return ["无效状态", "000000", 0, 0];
        },
    }
}
</script>